package com.wzy.java;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ThreadFactory;

public class test28 implements ThreadFactory {
    @Override
    public Thread newThread(Runnable r) {
        List<Product> prodList = new ArrayList<>();
        for (int i = 0; i <= 50000; i++) {
            Product product = new Product(i, i + i, new BigDecimal(i), "面包" + i, "零食" + i);
            prodList.add(product);
        }
        prodList.stream().forEach(item -> {
            System.out.println(item);
        });
        return null;
    }

    public static void main(String[] args) {

    }
}
